package com.celesea.framework.util;

import com.celesea.framework.entity.BaseEnum;

/**
 * @author JackYuan
 * @create 2017-11-29 10:17
 */
public class EnumUtil {
    public static String getName(BaseEnum[] values, Integer code) {
        final String name = null;
        for (BaseEnum item : values) {
            if (item.getCode() == code) {
                return item.getName();
            }
        }
        return null;
    }
}
